/*
 * @Author: xiawei 1243162387@qq.com
 * @Date: 2024-04-15 09:15:44
 * @LastEditors: xiawei 1243162387@qq.com
 * @LastEditTime: 2024-04-15 09:45:27
 */

import { http, HttpResponse  } from 'msw';
import { faker } from '@faker-js/faker';

const baseUrl = '';

export default [
  http.post(`${baseUrl}/dashboard/statistics/app`, () => {
    return HttpResponse.json({
      errors: null,
      code: 20000,
      message: '查询成功。',
      result: {
        xAxis: ['vue2-app', 'vue3-app', 'react-app'],
        yAxis: [faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int(
          {
            min: 10,
            max:200,
          }
        )]
      },
      success: true,
    })

  }),
  http.post(`${baseUrl}/dashboard/statistics/alarm`, () => {
    return HttpResponse.json({
      errors: null,
      code: 20000,
      message: '查询成功。',
      result: {
        xAxis: [],
        yAxis: [faker.number.int({
          min: 10,
          max:200,
        }),faker.number.int( {
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        }), faker.number.int({
          min: 10,
          max:200,
        } )]
      },
      success: true,
    })

  }),
];